package com.atgm.mall.gmmailorder.feign;

import com.atgm.common.utils.R;
import com.atgm.mall.gmmailorder.feign.fallback.ProductFeignFallbackService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "gm-mall-product", qualifier = "productFeignService", fallback = ProductFeignFallbackService.class)
public interface ProductFeignService {

    /**
     * 根据skuId查询spu的信息
     * @param skuId
     * @return
     */
    @GetMapping(value = "/gmmallproduct/spuinfo/skuId/{skuId}")
    R getSpuInfoBySkuId(@PathVariable("skuId") Long skuId);

    /**
     * 获取游戏信息
     * @param gameIds
     * @return
     */
    @GetMapping("/gmmallproduct/goods/orderGameInfo")
    R getOrderGameInfo(@RequestParam("gameIds") List<Long> gameIds);

}
